import { CmdButton, CmdDivider, CmdTabItem, CmdTabs } from '@amcax/base';
import { cmdImport } from '../../commands/cmd-import';
import { cmdFit2DView } from '../../commands/cmd-fit2DView';
import { cmdAirfoil } from '../../commands/cmd-airfoil';
import { cmdAirfoilOptimize } from '../../commands/cmd-airfoil-optimize';
import { cmdFairing } from '../../commands/cmd-airfoil-fairing';
import { cmdPolarCurve } from '../../commands/cmd-arifoil-polarCurve';
import { cmdEditVertex } from '../../commands/cmd-editVertex';
import { cmdExport } from '../../commands/cmd-export';
import './index.scss';

export default function CommandBar() {
  const tabItems: CmdTabItem[] = [
    {
      id: 'standard',
      label: '标准',
      children: (
        <>
          <CmdButton cmd={cmdFit2DView} />
          <CmdDivider />
          <CmdButton cmd={cmdAirfoil} />
          <CmdButton cmd={cmdAirfoilOptimize} />
          <CmdDivider />
          <CmdButton cmd={cmdFairing} />
          <CmdButton cmd={cmdPolarCurve} />
          <CmdButton cmd={cmdEditVertex} />
          <CmdDivider />
          <CmdButton cmd={cmdImport} />
          <CmdButton cmd={cmdExport} />
        </>
      ),
    },
  ];

  return (
    <div
      className='airfoil-command_bar'
      style={{
        position: 'absolute',
        width: '100%',
        top: 0,
      }}>
      <CmdTabs items={tabItems} />
    </div>
  );
}
